from rest_framework_mongoengine.serializers import DocumentSerializer, serializers

from models.task import ScanEventActions


class EventActionSerializer(DocumentSerializer):
    event_id = serializers.CharField()
    target_id = serializers.CharField()
    user_id = serializers.CharField()
    target_url = serializers.CharField()
    verification = serializers.IntegerField(required=False)
    action = serializers.IntegerField(required=False)

    class Meta:
        model = ScanEventActions
        fields = [
            'event_id',
            'target_id',
            'user_id',
            'target_url',
            'verification',
            'action',
        ]
